package java9;
//鸡翁一值钱五；鸡母一值钱三；鸡雏三值钱一,白钱买百鸡
//X+Y+Z=100;
//5X+2Y+1/3*Z=100
public class Code121 {
	public static void main(String[] args) {
		int way=0;
		int k=0;
		for(int i=1;i<=20;i++){
			for(int j=1;j<=33;j++){
				k=100-j-i;
				if(k%3==0&&(5*i+3*j+k/3==100)){
					way++;
					System.out.println("买法"+way+"\n\n");
					System.out.println("鸡翁"+i+"\t鸡母"+j+"\t鸡雏"+k);
				}
			}
		}
	}
}
